Online documentation - WebsydianExpress v3.5 |
WSYEXTJS/ExtWebInsertPage
This is an abstract PageGenerator that can be used if you want to have an insert page outside a WebEditSuite. This page is designed for use in the Ext JS for WebsydianExpress framework.
The PageGenerator includes two EventHandlers: Insert and Cancel. The Insert EventHandler validates the record by calling a separate validation function (scoped by the ServiceFunctions function). This function performs the standard validation based on the Plex definitions. If the validation succeeds, the record is created.
You must start by creating a function that inherits from ExtWebInsertPage:
Source Object | Verb | Target Object |
---|---|---|
MyInsertPage | is a FNC | WSYEXTJS/ExtWebInsertPage |
Then you must specify the entity to insert records for by replacing the UIBasic.Update view with your own Update view:
Source Object | Verb | Target Object |
---|---|---|
MyInsertPage | replaces VW
...by VW |
UIBASIC/UiBasic.Insert
MyEntity.Update |
Finally, you must enter calls to a PageGenerator in the Insert and Cancel EventHandler.
In many cases, you will just get the insert page as part of a WebEditSuite - either by inheriting from ExtWebEditDialog or from ExtWebEditSuite.
You can customize the validation by making changes to the MyInsertPage.ServiceFunctions.Validation function. This function inherits from WSYAPI/Abstract.ValidationFunction
To specify default values for the fields, assign the values to the WsyDetails fields corresponding to the webinput fields of the Insert EventHandler.